package com.fit.pages;

import java.util.List;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SessionState;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.fit.interfaces.Borrow;
import com.fit.interfaces.Damage;
import com.fit.interfaces.RecordDamage;
import com.fit.interfaces.User;
import com.fit.service.RecordDamages;

public class ViewRecordDamage {

	@SessionState
	private User user;
	
	@Persist
	private String passedId;
	
	private boolean userExists;
	
	@Persist
	private String passedDamage;
	
	public User getUser(){
		return user;
	}
	
	public Object onActivate(){
		if(!userExists) return Login.class;
			return null;
	}
	@Inject
	@Property
	private RecordDamages damages;
	
	@Property
	private RecordDamage record;
	
	public Borrow getAllBorrows(){
		return record.getBorrow();
	}

	public String getPassedId() {
		return passedId;
	}

	public void setPassedId(String passedId) {
		this.passedId = passedId;
	}

	public String getPassedDamage() {
		return passedDamage;
	}

	public void setPassedDamage(String passedDamage) {
		this.passedDamage = passedDamage;
	}

	
	
	
}
